/*
 * Copyright (C) 2001-2008  Nishanth Menon <menon.nishanth at gmail dot com>
 *
 * Part of the predict two project done during NITC Final year.
 * Predict2: http://code.google.com/p/predict2/
 * NITC: http://web.nitc.ac.in/~cse/
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  US
 */


/*
 * BrahmaDisplayForm.java
 *
 * Created on September 26, 2001, 2:39 AM
 */

package GUI;

/**
 *
 * @author  lazarus
 * @version 
 */
public class BrahmaDisplayForm extends javax.swing.JDialog
{

    /** Creates new form BrahmaDisplayForm */
    public BrahmaDisplayForm (java.awt.Frame parent, boolean modal)
    {
        super (parent, modal);
        initComponents ();
        pack ();
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the FormEditor.
     */
    private void initComponents ()
    {                           // GEN-BEGIN:initComponents
        jPanel1 = new javax.swing.JPanel ();
        BaseTabbedPanel = new javax.swing.JTabbedPane ();
        ZoneServerWithDrawalPane = new javax.swing.JScrollPane ();
        ZoneServerWithDrawalArea = new javax.swing.JTextArea ();
        ZoneServerDepositerPane = new javax.swing.JScrollPane ();
        ZoneServerDepositArea = new javax.swing.JTextArea ();
        RemoteValidatorPane = new javax.swing.JScrollPane ();
        RemoteValidationArea = new javax.swing.JTextArea ();
        QuitButton = new javax.swing.JButton ();
        Heading = new javax.swing.JLabel ();
        getContentPane ().setLayout (new javax.swing.BoxLayout (getContentPane (), 0));
        addWindowListener (new java.awt.event.WindowAdapter ()
                           {
                           public void windowClosing (java.awt.event.WindowEvent evt)
                           {
                           closeDialog (evt);
                           }
                           }
        );

        jPanel1.setLayout (null);
        jPanel1.setPreferredSize (new java.awt.Dimension (860, 445));
        jPanel1.setBackground (java.awt.Color.black);

        BaseTabbedPanel.setName ("BaseTab");
        BaseTabbedPanel.
            setToolTipText ("Click this to See the RemoteMaster Server Validator Conenctions");

        ZoneServerWithDrawalPane.setBorder (new javax.swing.border.
                                            LineBorder (java.awt.Color.red));
        ZoneServerWithDrawalPane.setName ("ZoneServerWithDrawalPane");
        ZoneServerWithDrawalPane.setViewportBorder (new javax.swing.border.
                                                    LineBorder (java.awt.Color.green));

        ZoneServerWithDrawalArea.setEditable (false);
        ZoneServerWithDrawalArea.setBackground (java.awt.Color.cyan);
        ZoneServerWithDrawalPane.setViewportView (ZoneServerWithDrawalArea);

        BaseTabbedPanel.addTab ("Zone Server Withdrawal Connections Information", null,
                                ZoneServerWithDrawalPane,
                                "Click this to see the Withdrawal Requests that the Zone servers have send us");


        ZoneServerDepositerPane.setBorder (new javax.swing.border.
                                           LineBorder (java.awt.Color.blue));

        ZoneServerDepositArea.setEditable (false);
        ZoneServerDepositArea.
            setText
            ("asdfasdfasfasdaklsdfksdhflksdfhlksdhfaklsdalksfhalskfhalskdfhaslkfhaslkfhaslkfhaskfhaslkfhaslfhaslkfhaslkdalskdhaslkfhaslkd\nasfasd\nfasdf\nasdf\nasdf\nasdf\nasd\nfas\ndfa\nsdf\n\n\n\n\n\n\n\n\ns\n\nf\nas\ndf\nasdf\n\nasd\n\ns\nf\ns\nf\n\nsd\nf\nsdfs\ndf\na");
        ZoneServerDepositArea.setBackground (java.awt.Color.pink);
        ZoneServerDepositerPane.setViewportView (ZoneServerDepositArea);

        BaseTabbedPanel.addTab ("ZoneServerDeposit Request Connection Information", null,
                                ZoneServerDepositerPane,
                                "Click this to See the Connections that have been extablished from the Zone Servers for the deposit of Cash Tokens");


        RemoteValidatorPane.setBorder (new javax.swing.border.
                                       LineBorder (java.awt.Color.orange));
        RemoteValidatorPane.setName ("RemoteValidatorPane");
        RemoteValidatorPane.setFont (new java.awt.Font ("Arial", 1, 14));

        RemoteValidationArea.setEditable (false);
        RemoteValidationArea.setCaretColor (java.awt.Color.red);
        RemoteValidationArea.setForeground (java.awt.Color.blue);
        RemoteValidationArea.
            setText
            ("sdfasdfafsdljhsdlkskdfhalksflksdflaskdhflksdhalksjhalksjhalksjhlakshflakshdlaksjhalksdfalksdflaksdfhalskdfhlaskflasdf\nasdf\nasdf\nasf\nasd\nfa\nsf\nasd\nfa\nsdfas\nf\nas\n\n\ns\n\n\nas\nd\nf\nas\nf\nas\n\nasfas\nf\n\nasd\nf\nas\n\nf\nas\nf\nas\nfas\ndf");
        RemoteValidationArea.setBackground (java.awt.Color.lightGray);
        RemoteValidatorPane.setViewportView (RemoteValidationArea);

        BaseTabbedPanel.addTab ("Remote Master Server  Validation Connections", null,
                                RemoteValidatorPane,
                                "Click this to see the Connections Established for the Remote Master Servers for the validation of cash tokens reached there");

        jPanel1.add (BaseTabbedPanel);
        BaseTabbedPanel.setBounds (20, 90, 820, 280);


        QuitButton.setToolTipText ("Click this To Quit out of the Brahma Software");
        QuitButton.setLabel ("Quit");
        QuitButton.setBorder (new javax.swing.border.SoftBevelBorder (0));
        QuitButton.setForeground (java.awt.Color.red);
        QuitButton.setActionCommand ("QuitButton");
        QuitButton.setFont (new java.awt.Font ("TimesNewRoman", 1, 18));
        QuitButton.setText ("Quit");
        QuitButton.setBackground (java.awt.Color.darkGray);
        QuitButton.addMouseListener (new java.awt.event.MouseAdapter ()
                                     {
                                     public void mouseClicked (java.awt.event.MouseEvent evt)
                                     {
                                     QuitButtonMouseClicked (evt);
                                     }
                                     }
        );
        jPanel1.add (QuitButton);
        QuitButton.setBounds (320, 390, 170, 30);


        Heading.setBorder (new javax.swing.border.
                           CompoundBorder (new javax.swing.border.BevelBorder (0),
                                           new javax.swing.border.EtchedBorder ()));
        Heading.setText ("The Brahma Connection Information");
        Heading.setForeground (new java.awt.Color (102, 255, 0));
        Heading.setHorizontalAlignment (javax.swing.SwingConstants.CENTER);
        Heading.setFont (new java.awt.Font ("Gothic", 0, 18));
        jPanel1.add (Heading);
        Heading.setBounds (20, 30, 820, 50);


        getContentPane ().add (jPanel1);

    }                           // GEN-END:initComponents

    private void QuitButtonMouseClicked (java.awt.event.MouseEvent evt)
    {                           // GEN-FIRST:event_QuitButtonMouseClicked
// Add your handling code here:
        System.exit (1);
    }                           // GEN-LAST:event_QuitButtonMouseClicked

    /** Closes the dialog */
    private void closeDialog (java.awt.event.WindowEvent evt)
    {                           // GEN-FIRST:event_closeDialog
        setVisible (false);
        dispose ();
    }                           // GEN-LAST:event_closeDialog

    /**
    * @param args the command line arguments
    */
    public static void main (String args[])
    {
        new BrahmaDisplayForm (new javax.swing.JFrame (), true).show ();
    }

   /** Call this to Update the text on Screen*/
    public void setTextRemote (String Message)
    {
        String ToPut = "Sorry! Nothing to Display";

        if ((Message != null))
            if (Message.length () != 0)
                ToPut = Message;
        RemoteValidationArea.setText (ToPut);
    }

   /** Call this to Update the text on Screen*/
    public void setTextWithdraw (String Message)
    {

        String ToPut = "Sorry! Nothing to Display";

        if ((Message != null))
            if (Message.length () != 0)
                ToPut = Message;
        ZoneServerWithDrawalArea.setText (ToPut);
    }

   /** Call this to Update the text on Screen*/
    public void setTextDeposit (String Message)
    {
        String ToPut = "Sorry! Nothing to Display";

        if ((Message != null))
            if (Message.length () != 0)
                ToPut = Message;
        ZoneServerDepositArea.setText (ToPut);
    }


    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JPanel jPanel1;
    private javax.swing.JTabbedPane BaseTabbedPanel;
    private javax.swing.JScrollPane ZoneServerWithDrawalPane;
    private javax.swing.JTextArea ZoneServerWithDrawalArea;
    private javax.swing.JScrollPane ZoneServerDepositerPane;
    private javax.swing.JTextArea ZoneServerDepositArea;
    private javax.swing.JScrollPane RemoteValidatorPane;
    private javax.swing.JTextArea RemoteValidationArea;
    private javax.swing.JButton QuitButton;
    private javax.swing.JLabel Heading;

    // End of variables declaration//GEN-END:variables

}
